class Solution:
    def moveZeroes(self, nums):
        """
        Do not return anything, modify nums in-place instead.
        """
        n = len(nums)
        i = 0
        mark = 0
        while i < n-mark:
            if nums[i] == 0:
                mark +=1
                b = nums[i]
                for j in range(i+1,n-mark):
                    nums[j-1] = nums[j]
                nums[n-mark] = b
                i -=1
            i +=1
        return nums



nums = [0,1,0,3,12]

ss = Solution()
print(ss.moveZeroes(nums))
